package cn.com.open.itembank.entity;

import cn.com.open.itembank.common.BaseModel;
import cn.com.open.itembank.common.GlobalConst;

import java.util.UUID;

/**
 * Created by lucky on 2017/7/20.
 */
public class OperateLog extends BaseModel {
    private String id;
    private String userId = GlobalConst.EMPTYUUID;
    private String optUrl;
    private String area = "";
    private String controller;
    private String action;
    private String optType;
    private String optTime;
    private String optIp;
    private String optDescription;

    /**
     * Instantiates a new Operate log.
     */
    public OperateLog() {
    }

    /**
     * Instantiates a new Operate log.
     *
     * @param optUrl         the opt url
     * @param controller     the controller
     * @param action         the action
     * @param optType        the opt type
     * @param optTime        the opt time
     * @param optIp          the opt ip
     * @param optDescription the opt description
     */
    public OperateLog(String optUrl, String controller, String action, String optType, String optTime, String optIp, String optDescription) {
        this.id = UUID.randomUUID().toString();
        this.optUrl = optUrl;
        this.controller = controller;
        this.action = action;
        this.optType = optType;
        this.optTime = optTime;
        this.optIp = optIp;
        this.optDescription = optDescription;
    }

    /**
     * Gets id.
     *
     * @return the id
     */
    public String getId() {
        return id;
    }

    /**
     * Sets id.
     *
     * @param id the id
     */
    public void setId(String id) {
        this.id = id;
    }

    /**
     * Gets user id.
     *
     * @return the user id
     */
    public String getUserId() {
        return userId;
    }

    /**
     * Sets user id.
     *
     * @param userId the user id
     */
    public void setUserId(String userId) {
        this.userId = userId;
    }

    /**
     * Gets opt url.
     *
     * @return the opt url
     */
    public String getOptUrl() {
        return optUrl;
    }

    /**
     * Sets opt url.
     *
     * @param optUrl the opt url
     */
    public void setOptUrl(String optUrl) {
        this.optUrl = optUrl;
    }

    /**
     * Gets area.
     *
     * @return the area
     */
    public String getArea() {
        return area;
    }

    /**
     * Sets area.
     *
     * @param area the area
     */
    public void setArea(String area) {
        this.area = area;
    }

    /**
     * Gets controller.
     *
     * @return the controller
     */
    public String getController() {
        return controller;
    }

    /**
     * Sets controller.
     *
     * @param controller the controller
     */
    public void setController(String controller) {
        this.controller = controller;
    }

    /**
     * Gets action.
     *
     * @return the action
     */
    public String getAction() {
        return action;
    }

    /**
     * Sets action.
     *
     * @param action the action
     */
    public void setAction(String action) {
        this.action = action;
    }

    /**
     * Gets opt type.
     *
     * @return the opt type
     */
    public String getOptType() {
        return optType;
    }

    /**
     * Sets opt type.
     *
     * @param optType the opt type
     */
    public void setOptType(String optType) {
        this.optType = optType;
    }

    /**
     * Gets opt time.
     *
     * @return the opt time
     */
    public String getOptTime() {
        return optTime;
    }

    /**
     * Sets opt time.
     *
     * @param optTime the opt time
     */
    public void setOptTime(String optTime) {
        this.optTime = optTime;
    }

    /**
     * Gets opt ip.
     *
     * @return the opt ip
     */
    public String getOptIp() {
        return optIp;
    }

    /**
     * Sets opt ip.
     *
     * @param optIp the opt ip
     */
    public void setOptIp(String optIp) {
        this.optIp = optIp;
    }

    /**
     * Gets opt description.
     *
     * @return the opt description
     */
    public String getOptDescription() {
        return optDescription;
    }

    /**
     * Sets opt description.
     *
     * @param optDescription the opt description
     */
    public void setOptDescription(String optDescription) {
        this.optDescription = optDescription;
    }
}
